- BDJ_INTERACTIVE
- BDJ_MOVIE
- HDMV_INTERACTIVE
- HDMV_MOVIE
Main.java
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import javax.tv.service.SIManager;
import javax.tv.service.Service;
import javax.tv.service.navigation.ServiceFilter;
import javax.tv.service.navigation.ServiceList;
import javax.tv.xlet.Xlet;
import javax.tv.xlet.XletContext;
import org.bluray.ti.Title;
import org.bluray.ti.TitleType;
import org.havi.ui.HScene;
import org.havi.ui.HSceneFactory;
import org.havi.ui.HScreen;
public class Main implements Xlet {
Graphics g = null;
int x=100, y=100;
public void initXlet(XletContext xc){
try {
Font font = new Font(null, java.awt.Font.BOLD, 48);
HScene hs= HSceneFactory.getInstance().getFullScreenScene(
HScreen.getDefaultHScreen().getDefaultHGraphicsDevice());
hs.setFont(font);
hs.setVisible(true);
g = hs.getGraphics();
g.setColor(Color.white);
// Titleリストの取得
SIManager sim = SIManager.createInstance();
ServiceList sl = sim.filterServices(new ServiceFilter(){
public boolean accept(Service arg0) {
return true;
}
});
for( int i = 0; i < sl.size(); i++ ){
Title t = (Title)sl.getService(i);
// Title Typeの取得
TitleType tt = (TitleType)t.getServiceType();
g.drawString(t.getName()+":"+tt.toString(), x, y); y+=50;
}
} catch (Exception e){
}
}
public void startXlet(){}
public void pauseXlet(){ }
public void destroyXlet(boolean unconditional){ }
}
関連する項目
- Title: 本ページのBD-J TitleのTitle typeは該当ページでのPlayback typeに相当